<?php
global $rportalparams,$sessiondroit,$html_repertoire_id,$op;
if($sessiondroit['admhtmlnew']!='' && (($op=='html') || ($op=='htmlnav'))){
	require_once('module/TPLN/TPLN.php');
	$TPLN = new TPLN();
	$box_edition_creation_path = $rportalparams->get_value("BOX","edition");
	$box_edition_creation_path.= 'creation.html';
	$TPLN->Open($box_edition_creation_path);
	$query="SELECT html_type.nom,html_type.id,html_type.edit_op FROM html_type";
	$TPLN->Parse("rid",$html_repertoire_id);
	$result=rportalrequete($query) or rportalerreur("$query","?op=");
	$i=0;
	if(rportalnbresult($result)==0){
		$TPLN->EraseBloc("type");
	}else{
		while($row=rportalligne($result))
		{
			if($row['edit_op']!=''){
				if($sessiondroit[$row['edit_op']]!=''){
					$TPLN->Parse("type.tid",$row['id']);
					$TPLN->Parse("type.nom",$row['nom']);
					$TPLN->Loop("type");
					$i=1;
				}
			}
		}
	}
	$TPLN->Write();
}
?>
